package com.example.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * TODO
 *
 * 合同表单实体类
 *
 * @author ding
 * @since 2024/6/2
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("合同信息")
@TableName("contract")
public class Contract {
    @TableId(type = IdType.AUTO)
    private Integer id;
    /** 委托单位Id */
    private Integer entrustId;
    /** 施工团队Id */
    private Integer teamId;
    /** 项目id */
    private Integer projectId;
    /** 投资金额 */
    private BigDecimal investment;
    /** 合同签订状态 */
    private Integer status;
    /** PDF文件保存路径 */
    private String filePath;
    /** 合同是否已经删除 0：未删除 */
    private Integer isDeleted;
    /** 删除人id */
    private Integer deleteId;
    /** 合同签订人姓名 */
    private String contractor;
    /** 签订人号码 */
    private String phone;
    /** 合同编号 */
    private String contractCode;

    /* 合同创建时间 */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /** 乐观锁版本号 */
    @ApiModelProperty("乐观锁版本号")
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Integer version;

    /* 施工团队名称 */
    @TableField(exist = false)
    private String teamName;
    /* 项目名称 */
    @TableField(exist = false)
    private String projectName;
    /* 委托单位名称 */
    @TableField(exist = false)
    private String entrustName;

}
